package com.ruoyi.dm.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.exception.DataRepeatException;
import com.ruoyi.dm.domain.CollectEstimateVO;
import com.ruoyi.dm.domain.CollectQueryParam;
import com.ruoyi.dm.domain.po.GroundCollectRecordPO;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;
import java.util.List;

public interface IGroundCollectRecordService extends IService<GroundCollectRecordPO> {
    /**
     * 检索
     *
     * @return
     */
    IPage query(CollectQueryParam queryParam);

    /**
     * 上传
     *
     * @param files
     * @param type
     * @return
     */
    List<String> uploadFile(MultipartFile[] files, String satellite, String type) throws DataRepeatException;

    /**
     * 删除
     *
     * @param id
     * @return
     */
    boolean delFile(Long id);

    /**
     * 批量删除
     *
     * @param delParam
     * @return
     */
    boolean delBatch(Long[] delParam);
    /**
     * 下载
     * @param id
     * @return
     */
    String download(Long id);

    /**
     * 批量下载
     * @param downloadParam
     * @return 返回压缩包路径
     */
    String downloadBatch(Long[] downloadParam);

    /**
     * 解析
     *
     * @param fileType
     * @param startYear
     * @param endYear
     * @param method
     * @param startTime
     * @param endTime
     * @return 评估文件路径, 若有.
     */
    boolean analysis (String fileType, Integer startYear, Integer endYear, String method, Date startTime, Date endTime);


    /**
     * 查看解析结果
     *
     * @return
     */
    CollectEstimateVO lookRes(String fileType, Date startTime, Date endTime) throws Exception;

    /**
     * 解析详情
     * @return
     */
    String lookDetailRes(String fileType, Date startTime, Date endTime) throws  Exception;

    int checkRepeat(String filename);
}
